package com.chao.config;

import com.alibaba.fastjson.JSON;
import org.springframework.security.core.GrantedAuthority;

import java.util.HashMap;

/**
 * @Author:PengChao
 * @Description:
 * @Date: Created in 11:01 2021/7/30
 * @Modified By:
 */
public class UserGrantedAuthority implements GrantedAuthority {

    private HashMap<String, Object> authorities = new HashMap<>();
    public UserGrantedAuthority(String name,Object value){
        authorities.put(name,value);
    }
    @Override
    public String getAuthority() {

        return JSON.toJSONString(authorities);
    }
}
